﻿
Imports System.IO
Public Class frmRptProrder
    Public MyReportname As String
    Dim MyReportLocate As String

    Private Sub CrystalReportViewer1_Disposed(ByVal sender As Object, ByVal e As System.EventArgs)
        Try
            File.Delete("C:\PROrder.xml")
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub


    Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load
        Try
            If DlgRptSelection.ShowDialog = Windows.Forms.DialogResult.Cancel Then Exit Sub
            MyReportLocate = Application.StartupPath.ToString & "\Report\" & MyReportname & ".rpt"
            Me.CrystalReportViewer1.ReportSource = MyReportLocate
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
End Class